﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" MasterPageFile="~/MasterPage.master"
    Inherits="UserDeviceInfo_List" CodeFile="UserDeviceInfo_List.aspx.cs" %>

<%@ Register Src="~/UserControl/GridPager.ascx" TagName="GridPager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>移动端用户列表</title>
    <style type="text/css">
        .wsd_button2
        {
            height: 21px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <div>
            <table id="wsd_inputtable">
                <tr>
                    <td class="tabletitle" colspan="4">
                        查询条件
                    </td>
                </tr>
                <tr>
                    <td class="tablefield">
                        关键字:
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txtKeyWord" class="default" Width="148px"></asp:TextBox>(imei/品牌/型号)
                    </td>
                    <td class="tablefield">
                        &nbsp;用户帐号/姓名:
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="txtLoginName" class="default"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tablefield">
                        设备状态：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlDeviceStatus" Width="150" runat="server" AutoPostBack="true">
                            <asp:ListItem Text="--请选择--" Value="0"></asp:ListItem>
                            <asp:ListItem Text="未绑定账户的设备" Value="1"></asp:ListItem>
                            <asp:ListItem Text="无效的设备" Value="2"></asp:ListItem>
                            <asp:ListItem Text="无效的绑定关系" Value="3"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tablefield">
                    </td>
                    <td>
                    </td>
                    <td colspan="2" class="buttonarea">
                        <asp:Button ID="btnQuery" runat="server" Text="查  询" CssClass="wsd_button2" OnClick="btnQuery_Click" />
                        &nbsp;&nbsp;
                        <input type="button" class="wsd_button2" size="47" value="重  置" name="reset" onclick="clearForm('form1')" />
                    </td>
                </tr>
            </table>
            <br />
            <table id="wsd_inputtable">
                <tr>
                    <td class="tabletitle">
                        设备列表
                    </td>
                    <td class="tabletitle">
                    </td>
                </tr>
            </table>
            <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
                <ContentTemplate>
                    <table id="wsd_listtable">
                        <tr>
                            <td style="width: 99%">
                                <asp:GridView BorderWidth="0" Width="100%" ID="GridView1" runat="server" AutoGenerateColumns="False"
                                    EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                                    EnableEmptyContentRender="true" DataKeyNames="ID" OnRowDataBound="GridView1_RowDataBound"
                                    AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging">
                                    <HeaderStyle CssClass="titlist" />
                                    <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                                    <Columns>
                                        <asp:HyperLinkField DataNavigateUrlFormatString="UserDeviceInfo_Item.aspx?id={0}"
                                            HeaderText="设备号(imei)" ItemStyle-Width="" DataNavigateUrlFields="ID" DataTextField="IMEICode"
                                            ControlStyle-Font-Underline="false"></asp:HyperLinkField>
                                        <asp:BoundField HeaderText="品牌" DataField="BrandName" ItemStyle-Width="16%"></asp:BoundField>
                                        <asp:BoundField HeaderText="型号" DataField="Model" ItemStyle-Width="16%"></asp:BoundField>
                                        <asp:BoundField HeaderText="绑定帐号" DataField="LoginCode" ItemStyle-Width="16%"></asp:BoundField>
                                        <asp:BoundField HeaderText="绑定姓名" DataField="PersonName" ItemStyle-Width="16%"></asp:BoundField>
                                        <asp:TemplateField HeaderText="设备有效" ItemStyle-HorizontalAlign="center" HeaderStyle-HorizontalAlign="center">
                                            <ItemTemplate>
                                                <b>
                                                    <%# Eval("DeviceActive").ToString() == "True" ? "<font size='3' color='green'>√</font>" : "<font size='3' color='red'>×</font>"%></b>
                                            </ItemTemplate>
                                            <HeaderStyle HorizontalAlign="Center" />
                                            <ItemStyle HorizontalAlign="Center" />
                                            <ItemStyle Width="" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerSettings Visible="false" FirstPageText="首页" LastPageText="尾页" Mode="NumericFirstLast"
                                        PageButtonCount="30" />
                                    <RowStyle CssClass="evenline" HorizontalAlign="Center" />
                                    <AlternatingRowStyle CssClass="oddline" />
                                </asp:GridView>
                                <uc1:GridPager ID="GridPager1" runat="server" Visible="false" />
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnQuery" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
            <br />
            <table id="wsd_inputtable">
                <tr>
                    <td width="100%" class="tabletitle">
                        操作选项
                    </td>
                </tr>
                <tr>
                    <td class="buttonarea">
                        <input class="wsd_button2" id="Button15" onclick="window.location.href='UserDeviceInfo_Item.aspx'"
                            value="新  增" name="Button2" type="button">
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
